#ifndef SLEEEXCEL_H
#define SLEEEXCEL_H
#include <ActiveQt/QAxBase>
#include <ActiveQt/QAxObject>
#include "sleeofficeglobal.h"
#include <QString>
#include <QObject>
#include <QHash>
#include <QDir>
#include "sleeqaxptr.h"
#include "sleeexcelbook.h"


class SLEEOFFICESHARED_EXPORT SleeExcel
{
    SleeQAxPtr                 m_excel;
    SleeQAxPtr                 m_exbooks;
    QHash<quint32, SleeExcelBook *> mqh_books;
    bool mb_excel_ok;
    quint32 m_last_id;
    quint32 gen_id();
    bool is_id_ok(quint32 id);
public:
    SleeExcel();
    void run_excel();
    void quit_excel();
    void set_visible(bool state);
    SleeExcelBook *open_workbook(QString file_pathname);
    SleeExcelBook *new_workbook();
    void close_workbook(SleeExcelBook **pp_exbook);

    void generate_documentation(const QDir &dir);
};

#endif // SLEEEXCEL_H
